<?php

	/*	
		START---------------------------------------------------------------------------------
	
		Name	: clsHotspot.php
		Version	: 1.0
		Author	: Henrik Andersen
		Company : Linnaeus University, Media Technology
		Mail	: Henrik.Andersen@lnu.se
		Date	: 2010-11-22 11:02 CET
		
		DESCRIPTION----------------------------------------------------------------------------
		
		An Object (clsObject) contains information on a 2D / 3D objects placed at a specific 
		Layar or hotspot (POI).
	
		SYNTAX---------------------------------------------------------------------------------
		
		The following list contains the public functions that can be used externally.
		
		Method Name:								Short Description:
		
		* setBase("www.site.com/content/")			Set URL to base dir.
		* getBase()									Get URL to base dir.
		* setFull("big_image.png")					Set name of "full" content.
		* getFull()									Get name of "full" content.
		* setReduced("small_image.png")				Set name of "reduced" content.
		* getReduced()								Get name of "reduced" content.
		* setIcon("icon_image.png")					Set name of "icon" content.
		* getIcon()									Get name of "icon" content.
		* setAll(BASE_URL, FULL, REDUCED, ICON)		Set name of all content at once.
		* getAll()									Get name of all content at once.
		
		TO DO'S--------------------------------------------------------------------------------
		
		END------------------------------------------------------------------------------------
	*/
	
	// IMPORT
		
	// PUBLIC CLASS
	
	class clsObject
	{				
		// PUBLIC VARIABELS
		
		/*	
			All the variables are mandatory and must obtain a 
			value for the system to function properly.
		*/
		
		public $baseURL			= null;
		public $full			= null;
		public $size			= 128.00000;
		
		/* 
			following variables are optional and do not need 
			a value in order to make the system work properly.
		*/
		
		public $reduced			= null;
		public $icon			= null;
		
		// PRIVATE VARIABELS
		
		private $objUtilities	= null;
				
		// CONSTRUCTOR FUNCTION
		
		/*------------------------------------------------------------------------------------
		__construct:									
		This is the constructor function and it creates instances of the necessary 
		external classes.
		------------------------------------------------------------------------------------*/
		public function __construct()
		{
			$this->objUtilities = new clsUtilities();
		}
		
		// PUBLIC FUNCTION
		
		/*------------------------------------------------------------------------------------
		setBase:									
		Public set method to set the base URL for this object (clsObject).
		
		!baseURL		String		The URL to the base path / dir.
		------------------------------------------------------------------------------------*/
		public function setBase($strBaseURL)
		{
			$this->baseURL = $strBaseURL;
		}
		
		/*------------------------------------------------------------------------------------
		getBase:									
		Public get method to get the base URL of this object (clsObject).
		
		@return		String		The URL to the base path as a string.
		------------------------------------------------------------------------------------*/
		public function getBase()
		{
			return $this->baseURL;
		}
		
		/*------------------------------------------------------------------------------------
		setFull:									
		Public function to set the name of the full content file.
		
		!strFullFile		String		The name of the full content file.
		------------------------------------------------------------------------------------*/
		public function setFull($strFullFile)
		{
			$this->full = $strFullFile;
		}
		
		/*------------------------------------------------------------------------------------
		NAME:									
		Public get method to get the name of the full content file.
		
		@return		String		The name of the "full" content as a string.
		------------------------------------------------------------------------------------*/
		public function getFull()
		{
			return $this->full;
		}
		
		/*------------------------------------------------------------------------------------
		setReduced:									
		Public set method to set the name of the reduced content file.
		
		!strReducedFileName		String		The name of the reduced content file.
		------------------------------------------------------------------------------------*/
		public function setReduced($strReducedFileName)
		{
			$this->reduced = $strReducedFileName;
		}
		
		/*------------------------------------------------------------------------------------
		getReduced:									
		Public get method to get the name of the reduced content file.
		
		@return		String		The name of the "reduced" content as a string.
		------------------------------------------------------------------------------------*/
		public function getReduced()
		{
			return $this->reduced;
		}
		
		/*------------------------------------------------------------------------------------
		setIcon:									
		Public method to set the name of the icon content file.
		
		!strIconFileName		String		The name of the icon content file.
		------------------------------------------------------------------------------------*/
		public function setIcon($strIconFileName)
		{
			$this->icon = $strIconFileName;
		}
		
		/*------------------------------------------------------------------------------------
		getIcon:									
		Public method to get the name of the icon content file.
		
		@return		String		The name of the "icon" content as a string.
		------------------------------------------------------------------------------------*/
		public function getIcon()
		{
			return $this->icon;
		}
		
		/*------------------------------------------------------------------------------------
		setAll:									
		Public function to set all content data. Can also be used to clear all data.
		
		?strBaseURL			String		The base path (http:www.domain.com/dir/).
		?strFullName		String		The filename of the "full" file (big_image.png).
		?strReducedName		String		The filename of the "reduced" file (small_image.png).
		?strIconName		String		The filename of the "icon" file (icon_image.png).
		------------------------------------------------------------------------------------*/
		public function setAll($strBaseURL = null, $strFullName = null, $strReducedName = null, $strIconName = null)
		{
			$this->baseURL	= $strBaseURL;
			$this->full		= $strFullName;
			$this->reduced	= $strReducedName;
			$this->icon		= $strIconName;
		}
		
		/*------------------------------------------------------------------------------------
		getAll:									
		Public function to get all content data.
		
		@return		Object		An object containing all the content data.
		------------------------------------------------------------------------------------*/
		public function getAll()
		{
			$objAll 			= new stdClass();
			$objAll->baseURL	= $this->baseURL;
			$objAll->full		= $this->full;
			$objAll->reduced	= $this->reduced;
			$objAll->icon		= $this->icon;
			
			return $objAll;
		}
	}

?>